package com.tmxk.day01.lifeng.demo4;

public class Fish extends Pet{
	private String sex;
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public Fish() {
	}
	public Fish(String name) {
		super();
		super.setName(name);
	}
	public Fish(String name, int age, String strain, String sex) {
		//super();
		super(name,age,strain);
		//super.setName(name);
		//super.setAge(age);
		//super.setStrain(strain);
		this.sex = sex;
	}
	public void swimming() {
		System.out.println(super.getName() + "擅长在水里游");
	}
	public void showInfo() {
		System.out.println("宠物的基本信息: 昵称是:" + super.getName() +" ,年龄是: " + super.getAge() + ",种类是: " + super.getStrain() + ",性别是:" +this.getSex());
	}
}
